from selenium import webdriver
from selenium.webdriver.common.by import By

from aotumation.base.basepage import BasePage

class MyfilePage(BasePage):
    """
    我的信息
    """
    # 页面url
    url = 'https://space.bilibili.com/12484702'
    # 页面元素
    guanzhu = (By.XPATH, '//*[@id="navigator"]/div/div[1]/div[3]/a[1]')
    fs = (By.ID, 'n-fs')
    touxiang = (By.XPATH, '//*[@id="app"]/div[1]/div[1]/div[2]/div[4]/span')

    # 页面逻辑
    def myfile(self):
        self.open()
        self.click(self.guanzhu)
        self.click(self.fs)
        self.click(self.touxiang)
        self.wait(3)

if __name__ == '__main__':
    driver = webdriver.Chrome()
    mf = MyfilePage(driver)
    mf.myfile()